/* eslint-disable react-native/no-inline-styles */
import * as React from 'react';
import {Button, View, Text} from 'react-native';

const DetailsScreen = ({navigation, route}) => {
  const {id, msg, data} = route.params;
  return (
    <View style={{flex: 1, alignItems: 'center', justifyContent: 'center'}}>
      <Text>ID:{id}</Text>
      <Text>MSG:{msg}</Text>
      <Text>{JSON.stringify(data)}</Text>
      <Button
        title="Go to Details... again"
        onPress={() => navigation.push('Details')}
      />
      <Button title="Go to Home" onPress={() => navigation.navigate('Home')} />
      <Button title="Go back" onPress={() => navigation.goBack()} />
    </View>
  );
};

export default DetailsScreen;
